Repository navigation
Conversation
…e the API docs.discourse.org becomes a static reference built from openapi.json: a page per endpoint, the sixteen sections under three headings, and every deep link into the previous page landing on its endpoint. Beside it, the Discourse MCP server's tools, resources and prompt, in the toolsets the server declares. The Publish Docs workflow builds it on each push to main and publishes it to GitHub Pages, with every file the site serves today kept at its address.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I wrote to you about this on 9 November. Here it is as a pull request, ready to merge.
This builds docs.discourse.org with sourcey from the same openapi.json, and publishes it to GitHub Pages from a workflow. The result is a static reference with a page per endpoint. It reads without JavaScript, so search engines index each endpoint and a shared link opens on just that one. It is searchable across the API and the MCP tools together, and every page is also published as Markdown with an llms.txt, so the assistants people point at Discourse can read the API itself.
On the same machine, a reader following a link to one endpoint downloads 49 KB instead of 294 KB, holds 0.8 MB of memory instead of 33 MB, and sees it in 0.23 s instead of 1.8 s.
What's kept:
#tag/Posts/operation/createTopicPostPMand the rest) lands on the endpoint it names.discourse.anchors.jsonholds those links. If an endpoint leaves the spec later, its old link is reported and dropped (anchorUnmatched: "warn") rather than failing the build.definitions/andresponses/, logo.svg (which the spec'sx-logopoints to), favicon.png, local.html and index-versioned.html. The workflow copies the repository's files beside the build, and only index.html is replaced.node server.jsand local.html for checking spec changes while you write them, as the README describes.What's new:
discourse.overlay.yaml. The spec itself is untouched.discourse.mcp.json), andnpm run mcp:snapshotrefreshes it after a release of@discourse/mcp. Anything new that no toolset names yet is listed after the toolsets, and the build says which.One step after merging: set Settings, Pages, Source to GitHub Actions, so the Publish Docs workflow serves the site. The custom domain stays as it is.
To see it locally:
npm install && npm run docs. sourcey is a dev dependency, so the lockfile adds its packages and moves 13 shared Babel packages up a minor version. Nothing is removed.If you need a CLA signed for this, point me to it and I'll sign it.
Kam / maintainer, sourcey